-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DROOLS-7488] tests - update rule action method in DRL #5381
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good coverage.
clearResults(session2); | ||
|
||
Optional<FactHandle> getFactHandleForPerson = getFactHandle(session2, pEleven); | ||
if (!getFactHandleForPerson.isEmpty()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not missing anything we always expect this Optional
not to be empty, right? In case this is the expectation, the test should reflect it and fail with an empty Optional
instead of simply silencing the problem as it does now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we expect that the Optional FactHandle will not be empty. Thanks for the suggestion, I will replace if-statement with an assertion so that the test will fail if the FactHandle is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, please only review my comment and change the test accordingly in case I'm right.
Thanks Mario, I changed the test and updated the PR. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
JIRA: DROOLS-7488